<template>
  <div class="work-card">
    <div class="label">我的作品（个）</div>
    <div class="num">{{ resourcesCount }}</div>
    <n-button class="prive-btn" type="primary" round ghost @click="handAdd">
      上传
    </n-button>
  </div>
  <add-list ref="addRef" />
</template>
<script setup lang="ts">
import { NButton } from 'naive-ui'
import { defineAsyncComponent, ref } from 'vue'
const AddList = defineAsyncComponent(
  () => import('@/components/release/AddList.vue')
)
type PropsState = {
  resourcesCount: number
}
withDefaults(defineProps<PropsState>(), {
  resourcesCount: 0
})

const addRef = ref()
const handAdd = () => {
  addRef.value.open()
}
</script>

<style scoped lang="scss">
.work-card {
  flex: 1;
  background: #ffffff;
  border-radius: 12px;
  opacity: 1;
  border: 1px solid #eeeeee;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 0;
  .label {
    font-size: 14px;
    font-family: PingFang SC, PingFang SC;
    font-weight: 400;
    color: #999999;
  }
  .num {
    margin-top: 20px;
    font-size: 30px;
    font-family: HONOR Sans, HONOR Sans;
    font-weight: 600;
    color: #333333;
  }
  .prive-btn {
    margin-top: 30px;
    font-size: 13px;
    width: 90px;
    height: 30px;
  }
}
</style>
